<script setup lang="ts">
import { ref } from 'vue';
import Child from './Child.vue';

const money = ref(100)
const car = ref('奥拓')

const updateCar = (newCar: string) => {
  car.value = newCar
}

const handleMoney = (newMoney: number) => {
  money.value += newMoney
}
</script>
<template>
  <div>
    App
    <p>car: {{car}}</p>
    <p>money: {{money}}</p>
    <hr />
    <Child @updateCar="updateCar" @updateMoney="handleMoney" />
  </div>
</template>
